<?php 




define('__PUBLIC__', './Public');

define('LIB_PATH', './Xbsphp/Lib/');

define('CORE_PATH', './Xbsphp/Core/');

define('CONFIG_PATH', './Xbsphp/Config/');



include CORE_PATH."function.php";



function __autoLoad($classname)
{
	// 组合可能存在的类的路径
	$clasPaths = array(
		LIB_PATH,
		CORE_PATH,
		APP_PATH.MODULE."/Controller/",
		APP_PATH.MODULE."/Common/",
		APP_PATH.MODULE."/Model/",
		);

	// 循环判断类文件是否存在，如果存在就引入
	foreach ($clasPaths as $value) {
		if(file_exists($value.$classname.".class.php")){
			include $value.$classname.".class.php";
		}

	}
}



define('MODULE', ucfirst(isset($_GET['m']) ? $_GET['m'] : C('DEFAULT_MODULE')));

define('CONTROLLER', ucfirst(isset($_GET['c']) ? $_GET['c'] : C('DEFAULT_CONTROLLER')));

define('ACTION', ucfirst(isset($_GET['a']) ? $_GET['a'] : C('DEFAULT_ACTION')));


$controller = CONTROLLER.'Controller';
$action =ACTION.C('DEFAULT_SUFFIX');


$obj = new $controller();
$obj->$action();
























 ?>

